package com;

import util.StringUtil;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

/**
 * Created by SunZZ on 2016/6/15.
 */
public class test {

        public static void main(String[] args) {
//            Date date = new Date();
//            System.out.println(StringUtil.strToDate((date, "MEDIUM"));
            TestBean one = new TestBean("A","B","C");
            TestBean two = new TestBean("B","A","X");
            TestBean tre = new TestBean("A","B","W");
            TestBean fou = new TestBean("B","A","T");
            TestMap test = new TestMap();
            test.add(one);
            test.add(two);
            test.add(fou);
            test.add(tre);
//            TestBean out  = test.get(one);
            for (Iterator<TestBean> it = test.iterator(); it.hasNext();){
//                list.add(it.next().toString());//数据转换为String
                 System.out.println(it.next().getValue());
            }

//            String str = "2016-02-24 00:00:00";
//            String str1 = "2016-03-23";
//            String st2r = "20160402";
//            String str3 = "2016年";
//            String str4 = "28/08/2016";
//            String tsrn="20140424111111";
//            String str6 = "2016-03-23至2016-07-29";
//            String str7 = "ffff(fff)";
//            String str8 = "ffff|fff|";
//            List<String> list1 = new ArrayList<>();
//            list1.add("a");
//            list1.add("aq");
//            list1.add("aaa");
//            list1.add("aa");
//            list1.add("ab");
//            list1.add("bb");
//            System.out.println(str.substring(0,4));
//            System.out.println(StringUtil.strToDate(str,"yyyy-MM-dd hh:mm:ss"));
//            System.out.println(StringUtil.strToDate(str1,"yyyy-MM-dd"));
//            System.out.println(StringUtil.strToDate(st2r,"yyyyMMdd"));
//            System.out.println(StringUtil.strToDate(str6,"toup"));
//
//            System.out.println(StringUtil.strToDate(str6,"todown"));
//            System.out.println(StringUtil.strToDate(str4,"dd/MM/yyyy"));
//            System.out.println(StringUtil.strToDate(tsrn,"yyyyMMddHHmmss"));
            //System.out.println(StringUtil.yearAdd(str3,"3nian"));
//            System.out.println(str8.split("\\|")[1]);
//            System.out.println(list1.contains("aaa"));
        }

}
